-
Notifications
You must be signed in to change notification settings - Fork 851
Add dest addr information to incoming UDPPacket objects #5704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
[approve ci clang-analyzer] |
|
This is blocking merging QUIC branch, which will be a part of 9.0 release. Please review this as soon as possible.. |
|
@scw00 Can you review please ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been working finely in quic branch for a long time.
iocore/net/UnixUDPNet.cc
Outdated
| if (opt.ip_family == AF_INET) { | ||
| int enable = 1; | ||
| #ifdef IP_PKTINFO | ||
| safe_setsockopt(fd, IPPROTO_IP, IP_PKTINFO, reinterpret_cast<char *>(&enable), sizeof(enable)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nikpick: should we continue when setsockopt failed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added error checks. It's complicated a bit, because it fails even if IP_PKTINFO is defined and try the other to support various platforms.
|
Blocks #5457 |
5630733 to
78ccaa3
Compare
78ccaa3 to
cac7e6b
Compare
|
@scw00 I added error checks. Please take another look and approve again if it's ok with you. |
scw00
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Destination addr is not stored into incoming UDP packets.
QUIC implementation needs to know the address for connection migration (a new connection may use different network route, IP address).
This is required for QUIC support.